Skip to content

Conversation

@JesseTG
Copy link
Contributor

@JesseTG JesseTG commented Jun 4, 2019

RepeatForever, RepeatUntilSuccess, and RepeatUntilFailure are new decorators used to continue a task
indefinitely. RepeatForever executes its child and returns TaskStatus.Continue, regardless of its
child's return status. RepeatUntilSuccess returns TaskStatus.Success if its child returns success,
else it returns TaskStatus.Continue. RepeatUntilFailure returns TaskStatus.Failure if its child
returns failure, else it returns TaskStatus.Continue.

RepeatForever, RepeatUntilSuccess, and RepeatUntilFailure are new decorators used to continue a task
indefinitely.  RepeatForever executes its child and returns TaskStatus.Continue, regardless of its
child's return status.  RepeatUntilSuccess returns TaskStatus.Success if its child returns success,
else it returns TaskStatus.Continue.  RepeatUntilFailure returns TaskStatus.Failure if its child
returns failure, else it returns TaskStatus.Continue.
@ashblue
Copy link
Owner

ashblue commented Jun 4, 2019

Until success decorator

@ashblue
Copy link
Owner

ashblue commented Jun 4, 2019

Repeat decorator

@ashblue
Copy link
Owner

ashblue commented Jun 4, 2019

Until failure decorator

@ashblue
Copy link
Owner

ashblue commented Jun 4, 2019

@JesseTG Just realizing there aren't any docs. My bad for not listing that anywhere (put a task in this week to setup some contribution guidelines that specify a checklist for PRs). If you have some spare time to throw in some README.md docs for each decorator that'd be awesome. If not no worries and I should be able to throw in the docs this weekend.

@JesseTG
Copy link
Contributor Author

JesseTG commented Jun 4, 2019

Oops. My bad. Yeah, I'll whip them up today or tomorrow.

Copy link
Owner

@ashblue ashblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this really looks great. After having some time to mull over this, had some thoughts on improving the code structure of decorators as a whole. The tests look solid, but the biggest thing I'm realizing is checks for a missing child should be moved into the parent. Also some minor things like missing docs and a little code maintenance. Getting a stylecop and editorconfig is on my list, which should help to reduce minor comments.

Commits could be broken up into three to clarify each new feature on the changelog. But no worries on that. Glad that the new features are well documented.

Sorry it took me so long to get to this. Tree visualizer took on a life of its own this week. Should be the largest feature added to Fluid BT for quite a while.

PS If you have time to tackle these items today that'd be awesome. If not I should be able to get to these Monday or Tuesday and merge everything in to develop.

@ashblue
Copy link
Owner

ashblue commented Jun 10, 2019

I've pushed a commit that will remove the need for any missing child decorator checks. Pull the latest and it should allow you to remove the corresponding logic as noted in the comments.

JesseTG and others added 8 commits June 10, 2019 17:35
Remove unneeded local variables, and let the three new decorators return `TaskStatus.Failure` if
they have no child
Now that DecoratorBase returns failure if it has no child, Does_not_crash_if_no_child can be moved
to the base decorator tests
Adds documentation for RepeatForever, RepeatUntilSuccess, and RepeatUntilFailure to README.md
Add icons for representing RepeatForever, RepeatUntilFailure, and RepeatUntilSuccess in the
visualizer
Copy link
Owner

@ashblue ashblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@ashblue ashblue merged commit 6f849dc into ashblue:develop Jun 11, 2019
@ashblue
Copy link
Owner

ashblue commented Jun 11, 2019

@all-contributors please add @JesseTG for repeat decorator actions

@allcontributors
Copy link
Contributor

@ashblue

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

@ashblue
Copy link
Owner

ashblue commented Jun 11, 2019

@all-contributors please add @JesseTG for code

@allcontributors
Copy link
Contributor

@ashblue

I've put up a pull request to add @JesseTG! 🎉

@JesseTG JesseTG deleted the jtg/repeater branch June 11, 2019 02:04
@ashblue
Copy link
Owner

ashblue commented Jun 13, 2019

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants